package com.fangzhi.mobel.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fangzhi.utils.GlobalParam;
import lombok.Data;
import org.springframework.util.StringUtils;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class UserListVo implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 员工姓名
     */
    private String name;

    /**
     * 员工昵称
     */
    private String nickName;

    /**
     * 员工手机号
     */
    private String mobile;

    /**
     * 员工性别 0：位置 1：男 2：女
     */
    private Integer gender = 0;

    /**
     * 员工头像
     */
    private String avatar = "moren.jpeg";

    /**
     * 账号状态 1：可用 2：禁用
     */
    private Integer status;

    /**
     * 员工账号
     */
    private String userCode;


    /**
     * 入职时间
     */
    private String joinTime;

    private Long deptId;
    private String deptName;
    private Long roleId;
    private String roleName;
    private String password;
    private Integer wxNum;

    @TableField(exist = false)
    private boolean statusButton;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public void setAvatar(String avatar) {
        if (StringUtils.hasText(avatar))
            this.avatar = GlobalParam.IMAGE_URL + avatar;
    }
}
